﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TeamPost.aspx.cs" Inherits="OnlineCooperation.TeamPost" Debug="true" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <link href="css/bootstrap.css" rel="stylesheet" />
    <link href="css/bootstrap-responsive.css" rel="stylesheet" />
    <link href="css/s.css" rel="stylesheet" />

    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="ico/apple-touch-icon-144-precomposed.png" />
    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="ico/apple-touch-icon-114-precomposed.png" />
    <link rel="apple-touch-icon-precomposed" sizes="72x72" href="ico/apple-touch-icon-72-precomposed.png" />
    <link rel="apple-touch-icon-precomposed" href="ico/apple-tsouch-icon-57-precomposed.png" />
    <link rel="shortcut icon" href="ico/favicon.png" />

    <script src="js/jquery.js"></script>
    <script src="js/bootstrap-transition.js"></script>
    <script src="js/bootstrap-alert.js"></script>
    <script src="js/bootstrap-modal.js"></script>
    <script src="js/bootstrap-dropdown.js"></script>
    <script src="js/bootstrap-scrollspy.js"></script>
    <script src="js/bootstrap-tab.js"></script>
    <script src="js/bootstrap-tooltip.js"></script>
    <script src="js/bootstrap-popover.js"></script>
    <script src="js/bootstrap-button.js"></script>
    <script src="js/bootstrap-collapse.js"></script>
    <script src="js/bootstrap-carousel.js"></script>
    <script src="js/bootstrap-typeahead.js"></script>
    <script src="js/html5shiv.js"></script>
    <script src="js/jqBootstrapValidation.js"></script>

    <style>
        body {
            padding-top: 60px;
            padding-bottom: 40px; /*background: rgb(246,249,253);*/
            background: url(img/brickwall.png) repeat 0 0;
            font: 14px/18px "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif;
            color: #000000;
            -webkit-font-smoothing: antialiased;
            -webkit-text-size-adjust: none;
        }

        /* Custom container */
        .container-narrow {
            margin: 0 auto;
            max-width: 1140px;
        }

            .container-narrow > hr {
                margin: 30px 0;
            }

        .BlankBlock {
            width: auto;
            height: 100px;
        }

        .PostPortrait {
            margin: 20px;
            width: 80px;
            height: 80px;
            float: left;
        }

        .ReplyPortrait {
            margin: 20px;
            width: 50px;
            height: 50px;
            float: left;
        }

        .PostBody {
            margin: 20px;
        }

        .ReplyBody {
            margin: 10px;
        }

        .Reply {
            background: #e8e1e1;
        }

        .CheckButton {
            float: right;
        }
    </style>

    <script type="text/javascript">
        function onreply(id, count) {
            var a = document.getElementsByName("reply")[parseInt(count)];
            var btn = document.getElementsByID("BtnCallback");
            var postid = document.getElementsByID("PostID");
            var postct = document.getElementsByID("PostContext");
            postid.value = id;
            postct = document.getElementsByName("reply")[parseInt(count)].value;
            btn.click();
            alert("id=" + id + "&text=" + document.getElementsByName("reply")[parseInt(count)].value);
            /* $.ajax({
                 type: "POST",
                 url: "reply.ashx", //获取服务器路径
                 data: "id=" + id + "&text=" + document.getElementsByName("reply")[parseInt(id)].value,
                 async: false, //必须设为同步才能得到正确的值 ！！！
                 success: function (data) {
                     path = data;
                 }
 
             });*/
        }

    </script>
</head>

<body>
    <form id="TeamIndexForm" runat="server">
        <asp:LinkButton ID="BtnCallback" runat="server" OnClick="BtnCallback_Click"></asp:LinkButton>
        <div class="container-narrow">
            <div class="subMenu">
                <div class="navbar navbar-static">
                    <div class="navbar-inner">
                        <div class="container" style="width: auto;">
                            <a id="sTop" class="brand" href="#">
                                <%=Session["UserName"] %></a>
                            <ul class="nav" role="navigation">
                                <li class="dropdown"><a id="drop1" href="#" role="button" class="dropdown-toggle"
                                    data-toggle="dropdown">个人信息</a>
                                    <ul class="dropdown-menu" role="menu" aria-labelledby="drop1">
                                        <li role="presentation"><a role="menuitem" tabindex="-1" href="#">修改头像</a></li>
                                        <li role="presentation"><a role="menuitem" tabindex="-1" href="ResetUserInfo.aspx">修改用户名</a></li>
                                        <li role="presentation" class="divider"></li>
                                        <li role="presentation"><a role="menuitem" tabindex="-1" href="ResetPwd.aspx">修改密码</a></li>
                                    </ul>
                                </li>
                                <li><a href="TeamIndex.aspx" id="s1" class="subNavBtn" role="button">团队管理</a></li>
                                <li><a href="PersonalFile.aspx" id="s2" class="subNavBtn" role="button">个人文件管理</a></li>
                            </ul>
                            <ul class="nav pull-right">
                                <li><a href="HomePageJump.aspx" target="_parent" class="dropdown">返回首页</a></li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>

            <div class="BlankBlock"></div>

            <div class="container row-fluid">
                <div class="span3">
                    <ul class="nav nav-list" contenteditable="false">
                        <li class="nav-header">当前团队</li>
                        <li  class="active"><a href="TeamPost.aspx">团队新鲜事</a></li>
                        <li><a href="TeamPage.aspx">基本信息</a></li>
                        <li><a href="TeamMember.aspx">团队成员</a></li>
                        <li class="divider"></li>
                        <li class="nav-header">协作平台</li>
                        <li><a href="TeamFile.aspx">文件管理</a></li>
                        <li><a href="DrawBoard.aspx">画板</a></li>
                        <li class="divider"></li>
                    </ul>
                </div>
                <div class="span9">
                    <div class="control-group">
                        <div class="controls">
                            <input
                                name="TxtNewPost"
                                type="text"                              
                                style="min-width: 200px;min-height: 30px;"
                                placeholder="说点什么分享一下~"/>

                            <asp:Button ID="NewPost"
                                class="btn btn-primary"
                                runat="server"
                                Text="Share"
                                OnClick="NewPost_Click"/>
                        </div>
                    </div>
                    <hr />
                    <ul id="Post" class="thumbnails">
                    <%int temp, count = -1,ConLen; %>
                    <%string str1 ,str2;%>
                    <%for (int ShowPost = PagePost.Count-1; ShowPost >=0 ; )%>
                    <%{%>
                        <%if (PagePost[ShowPost].StateID == 0)%>
                        <%{%>
                                <%temp = ShowPost;%>
                                <%count--;%>
                                <%int colon = PagePost[ShowPost].Content.IndexOf(':');%>
                                <%if (colon==-1) {%>
                                <%str1="系统";%>
                                <%str2=PagePost[ShowPost].Content;} %>
                                <%else%>
                                <%{%>
                                <%ConLen = PagePost[ShowPost].Content.Length - colon - 1;%>
                                <%str1=PagePost[ShowPost].Content.Substring(0, colon); %>
                                <%str2= PagePost[ShowPost].Content.Substring(colon+1,ConLen);%>
                                <%} %>
                                <li>
                                    <div class="thumbnail" >
                                        <div class="row-fluid">
                                            <div class="span3">
                   
                                                <p style="text-align: center">
                                                    <%= str1%>
                                                </p>
                                                <p style="text-align: center">
                                                    <%= PagePost[ShowPost].DateAndTime%>
                                                </p>
                                            </div>

                                            <div class="span9">
                                                <div class="PostBody">
                                                    <%= str2%>
                                                </div>
                                            </div>
                                        </div>
                                        <%int CurrentPostID = PagePost[ShowPost].PostID;%>
                                       <%ShowPost--; %>
                                    </div>
                                </li>
                        <%}%>
                        <%}%>
                    </ul>

                    <ul class="pager">                        
                        <li><asp:LinkButton runat="server" id="Btn_First" OnClick="Button_First_Click">首页</asp:LinkButton></li>                                                    
                        <li><asp:LinkButton ID="Btn_Pre" runat="server" OnClick="Button_Pre_Click" >上一页</asp:LinkButton></li>
                        <li><asp:LinkButton ID="Btn_Next" runat="server" OnClick="Button_Next_Click">下一页</asp:LinkButton></li>
                        <li><asp:LinkButton ID="Button_Last" runat="server" OnClick="Button_Last_Click">尾页</asp:LinkButton></li>
                    </ul>
                                    
                </div>
            </div>
        </div>
    </form>
</body>
</html>
